

public class E {
    V v1;
    V v2;
    double Weight;
    boolean isvisited = false;

    public E(V v1, V v2, double Weight) {
        this.v1 = v1;
        this.v2 = v2;
        this.Weight = Weight;
    }

    @Override
    public String toString() {
        return "(" + v1 + ", " + v2 + ":" + Weight + ")";
    }
}
